#include "project.h"
//#include "sem.h"
extern void *pthread_data_collection();
extern void *pthread_insert_linklist();
extern void *pthread_shm_refresh();
extern void *pthread_M0_ctrl();
extern void *pthread_A9_ctrl();
int main(int argc, const char *argv[])
{

	pthread_cond_init(&notempty, NULL);
	pthread_mutex_init(&mutex,NULL);
	pthread_t data_collection_pid, insert_linklist_pid,shm_refresh_pid,M0_ctrl_pid,A9_ctrl_pid;
    

	pthread_create(&data_collection_pid, NULL, pthread_data_collection, NULL);
	pthread_create(&insert_linklist_pid, NULL, pthread_insert_linklist, NULL);
	pthread_create(&shm_refresh_pid, NULL, pthread_shm_refresh, NULL);
	pthread_create(&M0_ctrl_pid, NULL, pthread_M0_ctrl, NULL);
	pthread_create(&A9_ctrl_pid, NULL, pthread_A9_ctrl,NULL);


	pthread_join(data_collection_pid, NULL);
	pthread_join(insert_linklist_pid, NULL);
	pthread_join(shm_refresh_pid, NULL);
	pthread_join(M0_ctrl_pid, NULL);
 	pthread_join(A9_ctrl_pid,NULL);





	return 0;
}


